<template>
	<div>
		<cmsFilter 
			v-model="value_filter"
			:list_filter="list_filter">
		</cmsFilter>
		{{value_filter}}
		<br>
		<el-button type="primary" @click="test()">改变</el-button>
	</div>
</template>

<script>
export default {
	data () {
		return {
			// 默认值
			value_filter:{
				label:"收藏",
				value:3,
				order:"desc"
			},
			// 数组
			list_filter:[
				{
					label:"时间",
					value:1,
					order:""
				},
				{
					label:"点赞",
					value:2,
					order:""
				},
				{
					label:"收藏",
					value:3,
					order:""
				},
				{
					label:"评论",
					value:4,
					order:""
				},
				{
					label:"价格",
					value:5,
					order:""
				}
			]
		}
	},
	methods:{
		test(){
			this.value_filter = {
				label:"价格",
				value:5,
				order:"desc"
			}
		},
		getValue(row){
			this.value_filter = row;
		}
	},
	mounted(){
	
	}
}
</script>

<style lang="scss" scoped>
	.filter{
		padding: 12px;
		background-color: #fff;
	}
</style>
